package com.xmall.member.define.request;

import com.xmall.define.base.BaseUpdateRequest;
import com.xmall.validate.group.AddGroup;
import com.xmall.validate.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 请求数据格式：新增/编辑 member - delivery_address
 */
@Data
public class DeliveryAddressUpdateRequest extends BaseUpdateRequest implements Serializable {

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, UpdateGroup.class })
    private Long memberId;

    /**
     * 收货电话
     */
    @NotBlank(message = "收货电话不能为空", groups = { AddGroup.class, UpdateGroup.class })
    private String phone;

    /**
     * 收货人
     */
    @NotBlank(message = "收货人不能为空", groups = { AddGroup.class, UpdateGroup.class })
    private String name;

    /**
     * 省份ID
     */
    private Integer provinceId;

    /**
     * 省份
     */
    private String provinceName;

    /**
     * 城市ID
     */
    private Integer cityId;

    /**
     * 城市
     */
    private String cityName;

    /**
     * 区域ID
     */
    private Integer countryId;

    /**
     * 区域
     */
    private String countryName;

    /**
     * 详细地址
     */
    private String addressDetail;

    /**
     * 是否默认地址（0否 1是）
     */
    @NotNull(message = "默认地址状态不能为空", groups = { AddGroup.class, UpdateGroup.class })
    private Integer defaultAddress;

}
